package com.bosssoft.cloud.wechat.common.infra.properties;

import com.bosssoft.cloud.wechat.common.bean.sms.SmsDTO;
import com.bosssoft.cloud.wechat.infrastructure.factory.YamlAndPropertySourceFactory;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 短信开放平台（SMS）配置
 * <p>
 * 包含开放平台的信息模板等
 *
 * @author wcy create on 2021/6/29 11:03 上午
 */
@Data
@Component
@ConfigurationProperties(prefix = "sms")
@PropertySource(value = "classpath:config/sms.yaml", factory = YamlAndPropertySourceFactory.class)
public class SmsProperties {
    /**
     * 短信开放平台provider
     */
    private String active;
    /**
     * 短信开放平台sms
     */
    private List<SmsDTO> provider;
}
